package org.feng.feign;

import lombok.AllArgsConstructor;
import org.feng.base.entity.Result;
import org.feng.service.EmailService;
import org.feng.vo.EmailMessageVO;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * @Author feng
 * @Date 2022/6/7 10:09
 * @Description TODO
 */
@RestController
@AllArgsConstructor
public class EmailFeignImpl implements EmailFeign {

    private EmailService emailService;

    @Override
    public Result<Boolean> sendEmail(EmailMessageVO emailMessage) {
        return Result.success(emailService.sendEmail(emailMessage));
    }


    @Override
    public Result<Boolean> sendEmailWithAttach(EmailMessageVO emailMessage, MultipartFile[] file) {
        return Result.success(emailService.sendEmailWithAttach(emailMessage, file));
    }
}
